define(function(require){
    'use strict';

    var
        _ = require('underscore'),
        $ = require('jquery'),
        Base = require('../_base/app');

    return Base.extend({

        template: require('tpl!./app.template'),

        events: {
            'click .js-cancel': 'close',
            'click .js-save': 'save'
        },

        save: function() {
            if(_.isFunction(this.options.callback)) {
                this.options.callback();
            }
            this.close();
        }

    });
});
